import axios from '@/request/axios'
import { commonResponse, EmployeeAddReqForm, EmployeeGetSingleReqForm, EmployeeListReqForm, EmployeeListResForm, EmployeeLoginResData, EmployeeStateUpdateReq } from '@/entity/entityDefine'

export const employeeList = (data: EmployeeListReqForm) =>{
    return axios.get<EmployeeListResForm>('/employee/page',data)
}

export const employeeAdd = (data: EmployeeAddReqForm) =>{
    return axios.post<commonResponse>('/employee/',data)
}

export const employeeStateUpdate = (data: EmployeeStateUpdateReq) =>{
    return axios.put<commonResponse>('/employee/',data)
}

export const employeeGetSingle = (data: EmployeeGetSingleReqForm) =>{
    return axios.get<EmployeeLoginResData>('/employee/getSingle',data)
}

export const employeeUpdate = (data: EmployeeAddReqForm) =>{
    return axios.put<commonResponse>('/employee/',data)
}